# pragma once 

# include "tracking_base.h"

class demarcate_controller : public tracking_base
{
private: 
    double delta_des = 0;
    double F_x_des = 0;
public:
    demarcate_controller()
    {
        cpp_tools::XmlParameterManager m_xml("order", host_path + settings_path + "/demarcate/settings.xml");
        bool writeXML = false;
        if (!m_xml.getParameter("", "delta", delta_des))
        {
            m_xml.setParameter("", "delta", delta_des);

            writeXML = true;
        }
        if (!m_xml.getParameter("", "F_x", F_x_des))
        {
            m_xml.setParameter("", "F_x", F_x_des);

            writeXML = true;
        }
        if (writeXML)
        {
            m_xml.saveToFile(host_path + settings_path + "/demarcate/settings.xml");
        }

        std::cout << "标定输入: delta = " << delta_des << ", F_x = " << F_x_des << std::endl;
    };

    ~demarcate_controller()
    {

    };

    std::pair<double,double> getControl(Eigen::VectorXd const & state, double delta, double F_x, double time) override
    {
        return {delta_des,F_x_des};
    };
};
